import request from '../utils/request';

export function query ( params ) {
    return request(`/permission/list`,{
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(params)
    });
}

export function getPermission ( params ) {
    return request(`/permission/get`,{
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(params)
    });
}

export function update({ newPermissions }) {
    return request(`/permission/update`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(newPermissions)
    });
}